<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'ShowAllUser.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<script type="text/javascript">
	var msg ='<%=session.getAttribute("tipMessage")%>';
	if (msg != ""&&msg!=null) {
	<%session.setAttribute("tipMessage","");%>
		alert(msg);
		
	}
	function altRows(id){
	if(document.getElementsByTagName){  
		
		var table = document.getElementById(id);  
		var rows = table.getElementsByTagName("tr"); 
		 
		for(i = 0; i < rows.length; i++){          
			if(i % 2 == 0){
				rows[i].className = "evenrowcolor";
			}else{
				rows[i].className = "oddrowcolor";
			}      
		}
	}
}

window.onload=function(){
	altRows('alternatecolor');
}
</script>
<style type="text/css">
table.table {
	font-family: verdana,arial,sans-serif;
	font-size:17px;
	color:#333333;
	border-width: 1px;
	border-color: #a9c6c9;
	border-collapse: collapse;
	text-align:center;
}
table.table th {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #a9c6c9;
}
table.table td {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #a9c6c9;
}
.oddrowcolor{
	background-color:#d4e3e5;
}
.evenrowcolor{
	background-color:#c3dde0;
}
</style>
  </head>
  <body>
  <br>
  <br>
  <div align=center><FONT SIZE="6" COLOR="颜色#000000">用户管理</FONT></div>
  <br>
  <br> 
  <div align=center>
  <form action="delectmanyuser" method="post">
     <table class="table table-hover"   id="alternatecolor" style="width:80%">
    <tr>
     <th style="background:white" colspan= "2"><input type="submit" value="删除" /></th>
     </tr>
  	<tr border=1>
  	<th>选择</th>
  		<th>用户名</th>
  		<th>姓名</th>
  		<th>电话</th>
  		<th>身份</th>
  		<th>操作</th>
  		
  	</tr>
  	<tbody id="AllUser">
  	
  	</tbody>
	<s:iterator value="userlist" id="user">
								<tr>
									<td><input type="checkbox" name="delectcb" value="<s:property value="#user.username" />"></td>													
									<td><s:property value="#user.username" /></td>	
									<td><s:property value="#user.name" /></td>	
									<td><s:property value="#user.phone" /></td>	
									<td><s:property value="#user.role" /></td>							
									<td><a href="<s:url action="showoneinfo">
						       <s:param name="user.username" value="#user.username"></s:param></s:url>"
													>修改</a>
													<a href="<s:url action="initpsw">
						       <s:param name="user.username" value="#user.username"></s:param></s:url>"
													onclick="return confirm('确定重置密码？')?true:false;">重置密码</a>
													
													
											</td>
					
								</tr>
	</s:iterator>
	
  

  	</table>
  	</form>
  	</div>
  </body>
</html>